package exception;

public class Test {

	static class MyException extends Exception {
	};

	static class Person {
		public void go() throws Exception {
			throw new Exception();
		}
	}

	static class Me extends Person {
		public void go() throws Exception {
			throw new MyException();
		}
	}

	public static void main(String[] args) {
		try {
			Person person = new Me();
			person.go();
		} catch (Exception e) {
			System.out.println("Exception");
		} catch (MyException e) {
			System.out.println("MyException");
		}

	}
}
